// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init({env:'luncai-160ro'});

// 云函数入口函数
exports.main = async (event, context) => {
    
    const db = cloud.database();
    // const wxContext = cloud.getWXContext();
    console.log(event)
    var {tableName,_id,updateData} = event;
    return db.collection(tableName).doc(_id).update({
        data:updateData
    })
}